package com.example.fireassistant_server.repository;

import com.example.fireassistant_server.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;
import java.util.Optional;


public interface UserRepository extends JpaRepository<User, String>, JpaSpecificationExecutor<User> {

    Optional<User> findByUsername(String username);

    User getById(String id);

    void deleteByCompany_Id(String id);

    List<User> findByCompany_Id(String id);

}
